package guutil

import (
	"crypto/rand"
	"log"
	"math/big"
)

func RandInt32(max int32) int32 {
	return int32(RandInt64(int64(max)))
}

func RandInt64(max int64) int64 {
	randInt, err := rand.Int(rand.Reader, big.NewInt(int64(max)))
	if err != nil {
		log.Println(err)
		return 0
	}
	return randInt.Int64()
}
